package com._54programer.ioc.config.beans.lifecycle;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

public class Dog  implements InitializingBean, DisposableBean {

    public Dog(){
        System.out.println("Dog create");
    }



    @PostConstruct
    public void postCon(){
        System.out.println("Dog PostConstruct");
    }

    @PreDestroy
    public void preDes(){
        System.out.println("Dog PreDestroy");
    }



    public void initDog(){
        System.out.println("Dog initDog");
    }

    public void destroyDog(){
        System.out.println("Dog destroyDog");
    }

    public void destroy() throws Exception {
        System.out.println("Dog destroy");
    }

    public void afterPropertiesSet() throws Exception {
        System.out.println("Dog afterPropertiesSet");
    }


}
